package io.huaguoguo.connector;

import io.huaguoguo.conf.ConnectorConf;
import io.huaguoguo.connector.adapter.HttpAdapter;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import lombok.Data;

/**
 * 描述： 连接器，请求进入Jerry的入口  <br>
 * CreateDate: 2021/11/25 <br>
 *
 * @author huaguoguo
 */
@Data
public class Connector {

    private Integer port;
    private String protocol;
    private Integer connectionTimeout;
    private Integer redirectPort;

    HttpAdapter httpAdapter;


    public void start(HttpAdapter httpAdapter) {
        this.httpAdapter = httpAdapter;
    }

    public HttpResponse process(HttpRequest httpRequest) {
        return httpAdapter.process(httpRequest);
    }
}
